// TOWN DIALOGUE SCRIPT
//    Town 24: Tower of Magi

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 10;
	nextstate = -1;
	question = "Apprentice";
	text1 = "This is one of the apprentices of the Tower of Magi. Apprentices here are forbidden to speak during the first year of their training. Thus, your conversation is extremely brief.";

begintalknode;
	tag = 11;
	nextstate = -1;
	text1 = "I guard the tower.";
	text2 = "Wizards are scary.";
	text3 = "Can't sleep at night.";
	text4 = "Portal's on the top floor.";
	text5 = "Did you hear something?";
	text6 = "There is a buzzing.";
	text7 = "Sometimes I hear whispers.";
	text8 = "What is that smell?";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,8));
	break;

begintalknode;
	tag = 12;
	nextstate = -1;
	text1 = "Will they let us go outside?";
	text2 = "This place gives me the creeps.";
	text3 = "The mages are so snooty.";
	text4 = "Can't wait to use the portal.";
	text5 = "I'll be a farmer again.";
	text6 = "When will the Empire find us?";
	text7 = "You've been to the surface!";
	text8 = "I want to taste proper food.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,8));
	break;

// Mahdavi

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Mahdavi";
	text1 = "You meet a small woman with dark skin and long black hair. She wears the robes of a member of the Triad, the masters of the Tower of Magi. Lines of tiny runes have been tattooed on her forearms and the backs of her hands.";
	text2 = "She bows slightly at the waist. _I am Mahdavi, of the Triad. Welcome back to the Tower._";
	text5 = "Mahdavi waits to see if you have anything more to say. She radiates the confidence and power common to powerful wizards.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What is your job here?_";
	text1 = "_I am of the Triad. Being a member of the Triad in the Tower of Magi is a post of no small responsibility,_ she says modestly.";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_What is the Tower of Magi?_";
	text1 = "_This is the tower of learning, the center of magical studies and knowledge in Avernum. Unfortunately, because of the portal, we have also become something of a waystation._";

begintalknode;
	state = 2;
	nextstate = 4;
	question = "_What are your current responsibilities?_";
	text1 = "_Lately, my efforts have been spent on the operation and maintenance of the portal. It is a tedious job, and I was only picked for it because of my experience with the Empire teleporter._";

begintalknode;
	state = 4;
	nextstate = 5;
	question = "_How were you involved with the Empire teleporter?_";
	text1 = "She smiles wryly. _During the Empire War, our foe's great weakness was its trouble sending troops down here. They made a massive portal to teleport hordes of soldiers here._";
	text2 = "_I directed an effort to destroy it. For this, I was thought an expert on these things, and so I was stuck with maintaining the portal here._";

begintalknode;
	state = 4;
	nextstate = 10;
	condition = gf(24,16) <= 1;
	question = "_What would you be doing if you weren't stuck with this job?_";
	text1 = "_I would be studying the vahnatai and their magic. A rich and valuable topic. Oh, well. I would have real trouble studying anyway. I was going to compare notes with Erika. She has learned a lot about them._";
	text2 = "She sighs. _I would give a lot if someone could tell me what Erika has learned about the vahnatai._";
	action = SET_SDF 24 16 1;
	code =
		toggle_quest(30,1);
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	question = "_How might I find out?_";
	text1 = "_Erika has moved up to Upper Avernum. Her tower is up there. She tends to guard her knowledge, but she is methodical. She probably has written down what she knows somewhere._";
	
begintalknode;
	state = 5;
	nextstate = 8;
	question = "_How does the portal work?_";
	text1 = "_The portal here was built several years ago. It was only two years ago that we were able to boost its power sufficiently to send someone near the surface. Our long-desired route to the surface was attained._";
	text2 = "_Unfortunately, it has meant that everybody sent up has had to pass through here._ She shrugs. _Tedious, but it's necessary. Slows down our research greatly, though._";

begintalknode;
	state = 8;
	nextstate = -1;
	question = "_What sort of research was done here?_";
	text1 = "_Many magical creations, plants and animals and such, were necessary to allow life in Avernum to continue. The glowing lichen on the ceiling of the caves, for example, was created through magical research in this tower._";

begintalknode;
	state = 5;
	nextstate = 7;
	question = "_You 'directed' the effort to destroy it?_";
	text1 = "_Yes. I personally located a group of adventurers, provided them with guidance, and directed them in their brave efforts to destroy the portal. They endured great risk, of course, but I had to invest a good deal of time in the effort._";

begintalknode;
	state = 7;
	nextstate = -1;
	question = "_What happened to those adventurers?_";
	text1 = "_They are currently in Avernum, helping to direct and supply your efforts on the surface and working to destroy isolated pockets of Empire and slithzerikai resistance in our lands below. They're quite revered. True heroes._";

begintalknode; ////
	state = 1;
	nextstate = 3;
	question = "_What is the Triad, exactly?_";
	text1 = "_The Triad is traditionally composed of the three most skilled mages in Avernum. We reside in the Tower and coordinate the magical efforts here. The Triad now consists of me, Solberg, and another._";
	text2 = "_This system usually works well. Sometimes, however, there are irregularities._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_Who is Solberg?_";
	text1 = "_A good friend, and one who has suffered much for Avernum. He usually studies in his quarters to the south._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_What's the name of the third member of the Triad?_";
	text1 = "_He calls himself 'X'. I don't understand him. Nobody does. He's skulking around somewhere. He's usually hiding in the southeast corner of the tower. He likes his privacy._";

begintalknode;
	state = 3;
	nextstate = 6;
	question = "_What sort of 'irregularities' happened?_";
	text1 = "She looks uncomfortable. _Linda the archmage was in the Triad once. She performed a rather unfortunate experiment with demonkind, and we had to banish her from the Tower._";
	text2 = "_Only lately have we allowed her to return, as we need her considerable skill. She seems to have learned her lesson._";

begintalknode;
	state = 6;
	nextstate = -1;
	condition = gf(24,14) >= 1;
	question = "_I suspect that Linda may be attempting to summon demons again._";
	text1 = "Mahdavi looks uncomfortable. _Yes, well, that may be. There have been certain unpleasant signs. We will look into it. Discreetly, of course. I doubt she will fully reproduce her past mistakes._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(24,16) == 1 && gf(47,14) >= 1;
	question = "_I was able to read Erika's notes on the vahnatai._ (Describe them to her.)";
	code =
		run_hardcode(15);
	break;

// Brigid

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 29;
	question = "Brigid";
	text1 = "There is a large woman with very short hair sitting at the counter. She wipes a hand clean and extends it to you. _I'm generally called Brigid._";
	text2 = "_I am a teacher here, in this proud tower of learning._";
	text5 = "Brigid chats with you while wiping her hands clean with a damp rag. She was grinding something with a mortar and pestle when you came in, and her fingers have the permanent brownish stains that are the mark of a true alchemist.";
	action = INTRO;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What are you working on?_";
	text1 = "_I am an experimenter in the alchemical arts._";

begintalknode;
	state = 30;
	nextstate = 29;
	question = "_Can you make potions?_";
	text1 = "_I don't make potions anymore. That's Vincent's business. What I do do is try to come up with new recipes. For example, I can teach you how to tell plain lichen from graymold. Or how to tell a mushroom that can make a curing balm from a toadstool that will just kill you._";
	text2 = "_And, along more utilitarian lines, I know how to make a wonderful healing elixir. Might you be interested in purchasing these fine recipes?_";

begintalknode;
	state = 29;
	nextstate = 31;
	question = "_Any interesting events in the tower recently?_";
	text1 = "_Merely the tromping through of every soldier, peasant, and wanderer within a hundred miles, each begging to be allowed to stay here and use the surface teleporter. Only that._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Do you do much experimenting?_";
	text1 = "_Magical training and experimentation are the main business of the Tower of Magi. It's a wonder any of us are still alive._";

begintalknode;
	state = 31;
	nextstate = -1;
	question = "_Hopefully nothing bad will befall anyone._";
	text1 = "_Apprentices learning spells. Wizards trying new concoctions.  Mages tinkering with fire and ice and acid and poison and dark powers. It's a wonder nothing has blown us up yet._";

begintalknode;
	state = 31;
	nextstate = 32;
	question = "_Is the Tower in danger currently?_";
	text1 = "_Not that I know of. The Tower has seen its share of turmoil over the years. Sometimes, dark powers have paid visits._ She shivers.";

begintalknode;
	state = 32;
	nextstate = -1;
	question = "_What dark powers?_";
	text1 = "She looks annoyed. _You should know that certain things are not asked of lightly._";

begintalknode;
	state = 29;
	nextstate = -1;
	question = "_Could you teach us quite a few things about alchemy?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Brigid's Lore","As could be expected from a resident of the Tower of Magi, Brigid knows a wide variety of magical lore. Since you are the vaunted surface explorers, she even gives you a discount.",15,2,3);
	break;

begintalknode;
	state = 29;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right. Good day._";
	action = END_TALK;

// Menlo

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Menlo";
	text1 = "The crone behind the counter is so aged and brittle that you're surprised none of her bits are falling off. _Welcome to my shop. I am Menlo,_ she says in a creaky voice.";
	text5 = "Menlo sighs. _Speak now, young one, and speak quickly. I haven't the time left for overly long conversations._";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_What do you do here?_";
	text1 = "_Child, I have forgotten more about magic than you will ever learn. My knowledge extends from the bottom of the sea and to the highest star. And I'll share it with you, if you ask nicely._";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_That seems likely, ma'am._";
	text1 = "_Learning is my life's work. Why else would I be here?_";

begintalknode;
	state = 58;
	nextstate = 59;
	question = "_What can you teach me?_";
	text1 = "She looks you over, and thinks. _You are the surface adventurers. I know of you, and I know of things which will help you. I will tell you of Erika for 100 coins, and dragons for 200._";
	text2 = "_Finally, for a scant 25 gold, I can give a friendly warning._";

begintalknode;
	state = 59;
	nextstate = -1;
	condition = gf(24,26) > 0 || coins_amount() >= 25;
	question = "_What's the friendly warning?_ Pay 25 coins.";
	text1 = "Since you have already paid, she doesn't charge you again.";
	text3 = "_Certain metals give off deadly magics, which cause those nearby to become ill. Certain magic items can do this as well. If you find yourself becoming ill for no reason, look to your inventory._";
	code =
		if (gf(24,26) == 0) {
		rs(1);
		sf(24,26,1);
		change_coins(-25);
		}
	break;

begintalknode;
	state = 59;
	nextstate = 61;
	condition = gf(24,27) > 0 || coins_amount() >= 100;
	question = "_What do you know about Erika's activities?_ Pay 100 coins.";
	text1 = "Since you have already paid, she doesn't charge you again.";
	text2 = "_Erika is the boon and bane of Avernum. Without her skills and leadership years ago, we Avernites would be starving and miserable, or dead. Without her hatred of the Empire, the Empire war would not have happened. Her tower is in Upper Avernum._";
	text3 = "_Nothing is sure in this world, but, if I would trust anyone, it would be her._";
	code =
		if (gf(24,27) == 0) {
		rs(1);
		sf(24,27,1);
		change_coins(-100);
		}
	break;

begintalknode;
	state = 59;
	nextstate = -1;
	condition = gf(24,28) > 0 || coins_amount() >= 200;
	question = "_We are curious about the dragons._ Pay 200 coins.";
	text1 = "Since you have already paid, she doesn't charge you again.";
	text2 = "You pay her. _There were three dragons in Avernum, Athron, Sulfras, and Khoth. They went up to the surface, suddenly, some years ago. I know not why. I only know one thing. They all hated the Empire with a passion._";
	text3 = "_I have heard rumors they they were seen flying off to mountains of the northwest regions of Valorim. They have been known to help us. If you can, you should talk to them._";
	text4 = "_If you ever meet Athron, stay far from her young. Threatening them will drive her into a frenzy._";
	code =
		if (gf(24,28) == 0) {
		rs(1);
		sf(24,28,1);
		change_coins(-200);
		}
	break;

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_Can you teach me any spells or skills?_";
	text1 = "_I don't have the energy or patience to teach magic anymore. I only have facts, not spells._";

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_I don't need anything._";
	text1 = "_Then I hope you walk along a safe path._";
	action = END_TALK;

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_I'm an important adventurer. Couldn't you help me for free?_";
	text1 = "_No. A professional sage never, ever works for free. Save your pennies, and return when you don't need to waste my scant remaining time._";
	action = END_TALK;

// Linda

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 85;
	question = "Linda";
	text1 = "This old woman wears long, rich velvet robes. They trail on the floor behind her. Silver characters are sewed into the hem.";
	text2 = "She has a strange, vacant look, and she doesn't seem to be sure of where she's going. She brushes past you as if she doesn't see you, but then she stops, turns. and nods. _I am called Linda._";
	text5 = "Linda has a strange, vacant look, and doesn't seem to be sure of where she's going. She doesn't tell you to go away, but she doesn't seem to be paying attention to you either. Her thoughts are far away.";
	action = INTRO;

begintalknode;
	state = 85;
	nextstate = 86;
	question = "_What sort of work are you engaged in?_";
	text1 = "She looks down, and is silent for a while. Then she looks up at you. _I do research._";

begintalknode;
	state = 86;
	nextstate = 87;
	question = "_Really? What kind of research?_";
	text1 = "She begins to speak in an odd sing-song voice. _That is the job of a mage. Magic is a huge, unexplored forest, and there is much of it that is still virgin._";

begintalknode;
	state = 87;
	nextstate = -1;
	question = "_And which part of the forest of magic are you exploring?_";
	text1 = "_I explore many of the bolder, more fascinating areas._";

begintalknode;
	state = 87;
	nextstate = 88;
	question = "_You're avoiding my questions._";
	text1 = "She looks agitated. _I study various creatures. I prefer not to say their names._";

begintalknode;
	state = 88;
	nextstate = 89;
	question = "_Are these creatures dangerous?_";
	text1 = "She says nothing.";

begintalknode;
	state = 89;
	nextstate = -1;
	condition = gf(24,14) >= 1;
	question = "_You're not involved in researching any demons or Haakai?_";
	text1 = "She jumps, as if you had slapped her. _No! I do nothing of that sort now! No research on that! Leave me alone!_ She waves a hand. You find yourself somewhere else.";
	action = END_TALK;
	code =
		relocate_char(get_pc_id(0),15,20,FALSE);
		relocate_char(get_pc_id(1),16,20,FALSE);
		relocate_char(get_pc_id(2),16,21,FALSE);
		relocate_char(get_pc_id(3),15,21,FALSE);
	break;	

begintalknode;
	state = 89;
	nextstate = -1;
	question = "_Tell us more about the creatures._";
	text1 = "_My research is private, and your questions are annoying me. Leave me._ She waves a hand. You find yourself somewhere else.";
	action = END_TALK;
	code =
		relocate_char(get_pc_id(0),15,20,FALSE);
		relocate_char(get_pc_id(1),16,20,FALSE);
		relocate_char(get_pc_id(2),16,21,FALSE);
		relocate_char(get_pc_id(3),15,21,FALSE);
	break;	

begintalknode;
	state = 85;
	nextstate = -1;
	condition = gf(24,14) >= 1;
	question = "_Are you doing research to try to summon demons?_";
	text1 = "She looks startled, then upset, then angry. Before you can ask a follow-up question, she waves a hand. You find yourself somewhere else.";
	action = END_TALK;
	code =
		relocate_char(get_pc_id(0),15,20,FALSE);
		relocate_char(get_pc_id(1),16,20,FALSE);
		relocate_char(get_pc_id(2),16,21,FALSE);
		relocate_char(get_pc_id(3),15,21,FALSE);
	break;	

// Vidrain

begintalknode;
	tag = 120;
	state = -1;
	nextstate = 113;
	question = "Vidrain";
	text1 = "There is a businesslike official standing at the entrance to the portal, notepad in hand. As people filter by walking to and from the portal, he checks them off.";
	text2 = "You remember filing past him on your first trip to the surface. He barely noticed you among the line of nervous warriors marching up the stairs. This time, you ask his name. _I'm Vidrain. You ..._ He checks a paper. _I can direct you. We are very busy._";
	text5 = "Vidrain asks, _Do you have further business with the portal?_ He barely seems to notice you. All this time near the portal is making him a little fuzzy.";
	action = INTRO;
	
begintalknode;
	state = 113;
	nextstate = 116;
	question = "_Why are you so busy?_";
	text1 = "_We're forcing as many people through here as possible. Everyone needs to be identified and checked off. Our staff is too small._";

begintalknode;
	state = 116;
	nextstate = 117;
	question = "_What do you need a larger staff for?_";
	text1 = "_What do you think? For thousands of people going through, each of which needs to be checked. Of course we need more help. As soon as I hire someone, he or she slips through the portal. Everyone wants to go to the surface._";

begintalknode;
	state = 117;
	nextstate = -1;
	question = "_People go to the surface without permission?_";
	text1 = "_Of course. And we can't send them back down. The portal's power is too limited. We can't spend it just to punish some reprobates._";

begintalknode;
	state = 113;
	nextstate = 114;
	question = "_Are you in charge of the portal?_";
	text1 = "_In a manner of speaking. You ... Temporary returnee, yes? I've received information on you._";

begintalknode;
	state = 114;
	nextstate = 115;
	question = "_What information do you have on me?_";
	text1 = "_You've been sent here for training. I can tell you where the instructors are._";

begintalknode;
	state = 115;
	nextstate = 118;
	question = "_Oh, good. Where are our instructors?_";
	text1 = "_The spells you are to receive will be taught to you by X or Solberg, of the Triad. I'm not aware of their exact locations, but poke around. I'm sure they'll turn up._";
	text2 = "_Solberg has been spending a lot of time in his quarters lately. And X likes to poke around in the libraries._";

begintalknode;
	state = 118;
	nextstate = -1;
	question = "_What library?_";
	text1 = "_I don't know. There are so many. Some are hidden. And some move around. You'll have to poke around. Sorry. Please excuse me. So much to do._";
	action = END_TALK;

// Kyanan

begintalknode;
	tag = 140;
	state = -1;
	nextstate = 141;
	question = "Kyanan";
	text1 = "You meet a tidy young mage in tidy robes. Her hair is neatly combed, and a small wand hangs at her belt. She is unusual among the mages, who tend to be a scruffy, distracted lot.";
	text2 = "You introduce yourself. _I'm Kyanan. Pleased to meet you._";
	text5 = "Kyanan says, _Yes? Anything else?_ She adjusts her small wand at her belt.";
	action = INTRO;

begintalknode;
	state = 141;
	nextstate = 142;
	question = "_Do you work for the Tower?_";
	text1 = "_Oh, yes. I am a teacher at the Magic School._";

begintalknode;
	state = 142;
	nextstate = -1;
	question = "_What sort of school is this?_";
	text1 = "_The Tower of Magi is where all of Avernum's most promising mages receive their schooling. It's a demanding process._";

begintalknode;
	state = 142;
	nextstate = 143;
	question = "_What specific area do you teach?_";
	text1 = "_I instruct the students in the school in the art of casting projectile spells._";

begintalknode;
	state = 143;
	nextstate = -1;
	question = "_What kind of projectile spells?_";
	text1 = "She laughs. _You don't know fear until you've been near someone casting his first bolt of fire._";

begintalknode;
	state = 141;
	nextstate = 144;
	question = "_What is the wand for?_";
	text1 = "She looks down at it. _You never know when you'll need a little defense._";

begintalknode;
	state = 144;
	nextstate = 145;
	question = "_Has there been much of a need for defense?_";
	text1 = "She looks uncomfortable. _Oh, there's never any threat, really. Just playing it safe. Nothing unusual. Nope._";

begintalknode;
	state = 145;
	nextstate = -1;
	condition = get_prestige() < 30;
	question = "_Are you sure? You're sure nothing is wrong?_";
	text1 = "She seems to debate whether or not to tell you more. She decides against it. _Yes. I am sure._";

begintalknode;
	state = 145;
	nextstate = 146;
	condition = get_prestige() >= 30;
	question = "_Are you sure? You're sure nothing is wrong?_";
	text1 = "She seems to debate whether or not to tell you more. Finally, she says, _I shouldn't tell you directly. But there is something you should know._";

begintalknode;
	state = 146;
	nextstate = 147;
	question = "_Yes?_";
	text1 = "She lowers her voice to a whisper. _Once, the archmage Linda worked here. She summoned a demon, and the Tower of Magi was almost destroyed. Now she has returned, and I fear that her work continues._";
	action = SET_SDF 24 14 1;

begintalknode;
	state = 147;
	nextstate = -1;
	question = "_Are you sure?_";
	text1 = "_No. And you didn't hear it from me. But be wary. And now I have said enough._ She walks away quickly.";
	action = END_TALK;

begintalknode;
	state = 141;
	nextstate = -1;
	question = "_I'd like to learn some magic._";
	text1 = "_Oh, dear. I'm sorry. You are far beyond anything I could teach you. Find the Triad. They are more appropriate for someone of your fame._";

// Vincent

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 169;
	question = "Vincent";
	text1 = "The man sitting at this counter is busily chopping pungent and rare herbs into neat little piles. Shelves behind him sag beneath a variety of multicolored solutions, each with its own illegible labels. _I am Vincent. Welcome to my shop._";
	text5 = "Vincent says, _Any other way I can help? You would, perhaps, like to buy a potion?_";
	action = INTRO;

begintalknode;
	state = 169;
	nextstate = 170;
	question = "_What sort of shop is this?_";
	text1 = "_The Tower apothecary. I make a variety of powerful potions, which are available for purchase. The Tower is an excellent place for this sort of business._";

begintalknode;
	state = 170;
	nextstate = 173;
	question = "_Why do you make potions?_";
	text1 = "_Potions are the most convenient of the item magics. Great strength, great portability, and they taste great! Who could ask for more?_";
	
begintalknode;
	state = 173;
	nextstate = -1;
	question = "_Taste great? Really?_";
	text1 = "_Honestly, no. But maybe someday I will develop a way to make them not taste horrible._";

begintalknode;
	state = 169;
	nextstate = -1;
	question = "_I want to do some shopping._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Vincent's Potions","Vincent takes great pride in the efficiency and tolerable flavor of his potions. Unfortunately, they're not that cheap.",16,4,3);
	break;

begintalknode;
	state = 170;
	nextstate = 171;
	question = "_Why is this a good place?_";
	text1 = "_I have sold potions to the finest mages in Avernum. Solberg, X, Patrick, and, well, others._ He seems to be debating whether to tell you something.";

begintalknode;
	state = 171;
	nextstate = -1;
	question = "_What did you think of Solberg, X and Patrick?_";
	text1 = "_Fine mages all._";

begintalknode;
	state = 171;
	nextstate = 172;
	question = "_Others, like who?_";
	text1 = "He looks around to make sure nobody else is nearby. _I can't tell anybody here, but listen. Linda has been buying a lot of weird herbs. They're used for other things, true, but the herbs she's been buying are ... very unusual._";
	text2 = "_It's suspicious. I stay out of tower business, but you have ... a reputation. I thought you should know._";

begintalknode;
	state = 172;
	nextstate = -1;
	question = "_Anything else you want to tell me?_";
	text1 = "_Hmm. Maybe you should talk to Kyanan. She's more worried about things than I am. And I'm not the one who said that._";

begintalknode;
	state = 169;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_Then .... Watch yourself. Good luck._";
	action = END_TALK;
	
// Carrie

begintalknode;
	tag = 200;
	state = -1;
	nextstate = 225;
	question = "Carrie";
	text1 = "This woman wears the robes of an apprentice. However, she completely lacks the scraping, servile manner of a Tower student. In fact, she acts downright combative. _You. Don't touch anything. These projects are delicate! I'm Carrie. An apprentice._ ";
	text5 = "_Are you sure you want to keep wasting time on little me? I'm just an apprentice, after all._ She says 'apprentice' as if she wants to pick a fight.";
	action = INTRO;

begintalknode;
	state = 225;
	nextstate = 226;
	question = "_How goes your apprenticeship?_";
	text1 = "_Well, I just completed my silence period, and am beginning my preparatory training. That means I'll learn something actually useful in, say, fifty years or so._";

begintalknode;
	state = 226;
	nextstate = -1;
	question = "_What is a silence period?_";
	text1 = "_All apprentice mages here spend a year in magically forced silence. It's supposed to, um... 'Force us to focus our inner mind.' or 'Free us to learn without the weight of response.'_";
	text2 = "_It's pure crap, of course. They just like to see us squirm._";

begintalknode;
	state = 226;
	nextstate = 227;
	question = "_What is this preparatory training?_";
	text1 = "_Now I can actually talk. That means a full year of grinding herbs for the masters while they pretend to teach us something useful. We don't learn any actual spells for two full years!_";
	text2 = "_I tell you, if it wasn't for Bernard, I'd die of boredom._";

begintalknode;
	state = 227;
	nextstate = -1;
	question = "_Two years does seem like a long time not to be taught spells._";
	text1 = "She sighs. _Well, more like three years before we're allowed to actually cast a spell of the first circle. But the silence period makes it seem like much, much more, believe me._";

begintalknode;
	state = 227;
	nextstate = -1;
	question = "_Who's Bernard?_";
	text1 = "She looks upset that she let it slip, but then decides that you aren't a threat. _He's still in his silence period, but believe me, he can communicate more without words than most can with a year of talking._";
	text2 = "She grins. _Of course, if I hadn't just spent a year being completely quiet, I wouldn't think you were worth telling any of this. No offense._";

begintalknode;
	state = 225;
	nextstate = 228;
	question = "_You seem angry._";
	text1 = "_I'm an apprentice. That means my life is one long routine of drudgery and degradation. On top of that, I lost my lab notes._";
	text3 = "_I'm an apprentice. That means my life is one long routine of drudgery and degradation. And I appreciate your help, but I don't see it getting any better._";
	action = DEP_ON_SDF 24 15 1;

begintalknode;
	state = 228;
	nextstate = -1;
	condition = gf(24,15) <= 1;
	question = "_What happened to them?_";
	text1 = "_I was mucking out the monster bins at the east end of the tower, and one of the creatures grabbed my lab notes. I couldn't get them back. I'm not allowed to kill the things. Of course, if someone else got them for me, it would be great._";
	text2 = "_I dropped them when a wight jumped out at me. Just so you know._ She looks at you hopefully.";
	action = SET_SDF 24 15 1;
	code =
		toggle_quest(29,1);
	break;
	
begintalknode;
	state = 225;
	nextstate = -1;
	condition = gf(24,15) == 1 && party_has_item(562);
	question = "_I found your lab notes._ (Give them to her.)";
	code =
		run_hardcode(14);
	break;


// Conruc

begintalknode;
	tag = 300;
	state = -1;
	nextstate = 385;
	question = "Conruc";
	text1 = "This mage wears a sash of office. He must be an official of some sort. He's not on duty now. He's just wandering aimlessly through the tower.";
	text2 = "When he sees you, he says _Ah. An adventurer. I'm administrator Conruc. You probably want Vidrain. He directs visitors._";
	text5 = "Conruc looks nervous. _I'm just the administrator. You probably want Vidrain. He's upstairs, just outside the portal chamber._ He seems eager to leave.";
	action = INTRO;

begintalknode;
	state = 385;
	nextstate = 386;
	question = "_Who is Vidrain?_";
	text1 = "_He's in charge of the portal, and thus of the day to day operations of the tower. The Triad controls all the magical stuff, which leaves me powerless._";

begintalknode;
	state = 386;
	nextstate = -1;
	question = "_Surely you have some responsibilities?_";
	text1 = "_Vidrain and the Triad control everything important in the tower between them. And I, the Administrator, am stuck with making sure the towels are clean and the trash gets taken out._";

begintalknode;
	state = 386;
	nextstate = 387;
	question = "_I'd still like to know about you._";
	text1 = "_Don't feel any need to be nice. Nobody needs to talk to me anymore. I just sat for hours waiting in that awful Council Room, and nobody came. So now I walk around. Life is more tolerable this way._";

begintalknode;
	state = 387;
	nextstate = -1;
	question = "_What Council Room?_";
	text1 = "_Let's make a room in the vahnatai style, they said! Hah! Those stools are uncomfortable as hell!_";

begintalknode;
	state = 385;
	nextstate = 391;
	question = "_So what does an administrator do?_";
	text1 = "_Oh, there's no need to make conversation on my behalf. I'm powerless to do anything to help you. The Triad has the real power._";

begintalknode;
	state = 391;
	nextstate = 388;
	question = "_What do you know of the Triad?_";
	text1 = "_The ever so mysterious and aloof Triad? They consider me completely beneath them! I didn't want to bring Linda back, but they didn't listen to one word I said!_";

begintalknode;
	state = 388;
	nextstate = 390;
	question = "_Why didn't you want to bring Linda back?_";
	text1 = "_'We wish the return of Linda.' they said. 'Oh, swell. She only summoned a demon lord into the Tower once. She's only mildly insane. What a beautiful idea! Let's proceed at once!' I said._";
	text2 = "_'We appreciate your acquiescence,' they said. And that was that. Sarcasm is lost on that lot._ He kicks a wall in irritation.";

begintalknode;
	state = 390;
	nextstate = -1;
	condition = gf(24,14) >= 1;
	question = "_You're right to be worried. I suspect Linda is attempting to resume her work._";
	text1 = "_Hmm. You should talk to the Triad members. I doubt they will do anything, but it's all we can do. Other than wait for the end._";

begintalknode;
	state = 385;
	nextstate = 389;
	question = "_Can you give me magical training?_";
	text1 = "He laughs. _I'm not allowed! Administrators aren't allowed to teach! And I used to be good at it, too._";

begintalknode;
	state = 389;
	nextstate = 391;
	question = "_Is there anyone here who can train us?_";
	text1 = "_Hmm. Not really. Solberg and X can give you spells when you've done impressive things on the surface. As for regular training, probably not here. You'll have to look somewhere else._";

begintalknode;
	state = 391;
	nextstate = -1;
	question = "_Where is the Triad?_";
	text1 = "_Oh, sure. Go talk to them. They're actually valued. Mahdavi's lab is in the second tier. Solberg's quarters are there too._";
	text2 = "_'X' hides in the private library, the one I'm not important enough to enter. I think it's in the first tier, southeast somewhere. You'd better go. Don't mind me. I'm not involved._ He stalks off.";
	action = END_TALK;
	
// Spider

begintalknode;
	tag = 420;
	state = -1;
	nextstate = 413;
	question = "Spider";
	text1 = "A gigantic spider stares at you with big beady eyes. At first, you aren't sure what it's going to do. Then it says, in a friendly, high-pitched voice, _Hi there! My name is Spider!_";
	text2 = "As you process this, it starts to bounce up and down happily. _I'm glad you are here!_";
	text5 = "Spider says, _You're still talking to me? Hooray!_ Its chirpy, happy voice starts to grate on your nerves.";
	action = INTRO;

begintalknode;
	state = 413;
	nextstate = 414;
	question = "_Why are you here?_";
	text1 = "_I'm here because the neato wizards here wanted to study me!_ It looks at you closely. _You're cute!_";

begintalknode;
	state = 414;
	nextstate = 417;
	question = "_Umm, thanks. You're cute too._";
	text1 = "_Really? You're nice!_ it chirps. _Wanna' go eat bugs?_";

begintalknode;
	state = 417;
	nextstate = 414;
	question = "_No, thanks. I just ate._";
	text1 = "_Oh. Bugs are yummy, and the wizards keep a bunch around for me. Sure you don't want some?_ You politely decline. It looks sad for a moment.";

begintalknode;
	state = 414;
	nextstate = -1;
	question = "_Do you like the wizards?_";
	text1 = "_The wizards are really, really powerful! They can kill a thousand flies with a single wave of their hand! Cool, huh?_ It gives a single, emphatic hop of approval.";

begintalknode;
	state = 414;
	nextstate = 415;
	question = "_How have they um, studied you?_";
	text1 = "_They say I'm a Giant, Intelligent, Friendly, Talking Spider, and a neat freak of nature or something. They say they should study us before we all disappear!_";
	text2 = "It thinks for a minute. _I think they also like my silk._";

begintalknode;
	state = 415;
	nextstate = -1;
	question = "_The wizards want your silk?_";
	text1 = "_Yeah. They use it to make magic things. Or do experiments, or something. Since they give me lots of yummy flies, though, I don't mind._ It pauses. _The wizards are nice!_";

begintalknode;
	state = 415;
	nextstate = 416;
	question = "_Why are the intelligent spiders disappearing?_";
	text1 = "_There aren't many of us in these icky caves anymore. Most of us went to the surface, where the bugs are tastier!_";

begintalknode;
	state = 416;
	nextstate = 418;
	question = "_How is your kind getting to the surface?_";
	text1 = "_We snuck there in Secret Tunnels, known only to we spiders!_ It scuttles back and forth to illustrate the sneaking part. _The spiders are up there now, living a happy, yummy life! If you see them, say hi!_";

begintalknode;
	state = 418;
	nextstate = -1;
	question = "_Can you tell us where these secret spider tunnels are?_";
	text1 = "_They're secret, silly!_ It thinks it over. _I'd better go before I forget not to tell you and then tell you. Bye!_ It bounces off.";
	action = END_TALK;